import pageController from "../controller/pageController"
import uploadControll from "../controller/uploadControll"

/*
 * @LastEditors: yuSeen
 * @LastEditTime: 2021-11-25 15:54:53
 * 天凉好个秋
 */
const koaRouter = require('koa-router')

const router = new koaRouter()

// 获取页面内容
router.post('/getPagelist', pageController.getPageList)

// 根据id获取页面内容
router.get('/getPageContent/:id', pageController.getPageContent)

// 获取当前正在使用的页面内容
router.get('/getCurPage', pageController.getCurPage)

// 保存并使用页面
router.post('/saveAndUse', pageController.saveAndUse)

// 删除页面
router.delete('/deletePage/:id', pageController.deletePage)

// 图片上传
router.post('/uploadImg', uploadControll.uploadImg)

export default router